package com.mallsystem.common.service;

import com.github.pagehelper.PageInfo;
import com.mallsystem.common.bean.User;
import com.mallsystem.common.exception.AllException;

import java.math.BigDecimal;

public interface UserService {
    //登录
    User login(String username,String password) throws AllException;
    //注册
    boolean reg(User user) throws AllException;
    //根据id修改用户
    boolean update(User user) throws AllException;
    //根据条件查询
    PageInfo<User> selectByCondition(User condition, Integer pageNum, Integer pageSize);
    //根据id查询用户
    User selectById(Integer id);
    //修改登录密码和支付密码
    boolean updateAllPassword(Integer id,String password,String payPassword) throws AllException;
    //修改状态
    boolean updateStatus(User user) throws AllException;
    //修改登陆密码
    boolean updatePassword(Integer id,String newPwd,String oldPwd) throws AllException;
    //修改支付密码
    boolean updatePayPassword(Integer id,String newPayPwd,String oldPayPwd) throws AllException;
    //充值余额
    boolean recharge(Integer id, BigDecimal sum) throws AllException;
}
